package palf.menuItems {
import flash.display.DisplayObjectContainer;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;

internal class MenuLabel implements MenuItem {

	private var label : String;

	public function MenuLabel(label : String) {
		this.label = label;
	}

	public function draw(canvas : DisplayObjectContainer) : void {
		var text_field : TextField = new TextField();
		text_field.defaultTextFormat = new TextFormat("Tahoma, _sans", 12, 0x333333);
		text_field.multiline = false;
		text_field.selectable = false;
		text_field.mouseEnabled = false;
		text_field.text = label;
		text_field.autoSize = TextFieldAutoSize.LEFT;
		canvas.addChild(text_field);
	}

}

}
